
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sj" uri="/struts-jquery-tags"%>
<!DOCTYPE html>
<html>
    <head>
        <sj:head />

        <script src="js/jquery.cookie.js"></script>
        <script src="js/coms.js"></script>
          <script src="js/bootstrap.min.js"></script>
        <title>Search Conference Item</title>
    </head>
    <body>

        <s:include value="/jsp/header.jsp">
            <s:param name="user" value="#session.user.username" />
        </s:include>
        <div class="container-fluid">
            <div class="row-fluid">
                <div class="span3">
                    <s:action name="selectMenu" executeResult="true"/>
                </div>
                <div class="span9">
                    <div class="hero-unit">
                        <s:form action="searchConferenceItem_">
                            <table align="center" cellpadding="5">
                                <tr>
                                    <td><s:text name="fieldLabel.topic"/></td>
                                    <td ><s:textfield name="conferenceItem.topic" size="40" maxlength="40"/> </td>
                                </tr>

                                <tr>
                                    <td><s:text name="fieldLabel.conference"/></td>
                                    <td> <s:select name="conference" list="conferenceList" listKey="id" listValue="name" required="true"/> </td>
                                </tr>
                                <tr>
                                    <td colspan="2">
                                        <s:submit label="button.label.search"/>
                                    </td>
                                </tr>
                            </table>
                        </s:form>

                        <table align="center" cellpadding="5">
                            <tr style="background: #0088cc">
                                <th><s:text name="fieldLabel.conference"/></th>
                                <th><s:text name="fieldLabel.topic"/></th>
                                <th><s:text name="fieldLabel.conferenceItemType"/></th>
                                <th><s:text name="fieldLabel.startDate"/></th>
                                <th><s:text name="fieldLabel.endDate"/></th>
                                <s:if test="%{admin}">
                                <th>Action</th>
                                </s:if>
                            </tr>

                            <s:iterator value="conferenceItemList" status="conferenceItemStatus">
                                <s:if test="#conferenceItemStatus.even == true">
                                    <tr style="background: #f2f4fe">
                                    </s:if>
                                    <s:else>
                                    <tr style="background: #dae2fc">
                                    </s:else>
                                    <td> <s:property value="conference.name"/></td>
                                    <td> <s:property value="topic"/></td>
                                    <td> <s:property value="conferenceItemType.name"/></td>
                                    <td> <s:property value="startDateStr"/></td>
                                    <td> <s:property value="endDateStr"/></td>
                                    <s:if test="%{admin">
                                    <td> 
                                        <div class="btn-group">
                                            <a class="btn btn-primary" href="#"><i class="icon-th-large icon-white"></i> </a>
                                            <a class="btn btn-primary dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>
                                            <ul class="dropdown-menu">
                                                <li><a href="<s:url action="editConferenceItem_%{id}" />"><i class="icon-pencil"></i> <s:text name="label.edit"/></a></li>
                                                <li><a href="<s:url action="deleteConferenceItem_%{id}" />"><i class="icon-trash"></i> <s:text name="label.delete"/></a></li>
                                                <li> <a href="<s:url action="sendSubmissionDateReminderConferenceItem_%{id}" />"><i class="icon-time"></i> <s:text name="label.sendReminder"/></a></li>
                                                <li><a href="<s:url action="notifyAuthorsConferenceItem_%{id}" />"><i class="icon-envelope"></i> <s:text name="label.notifyAuthor"/></a></li>
                                                <li><a href="<s:url action="calculateReviewConferenceItem_%{id}" />"><i class="icon-leaf"></i> <s:text name="label.calculateReview"/></a></li>

                                            </ul>
                                        </div>
                                    </td> 
                                    </s:if>

                                </tr>
                            </s:iterator>
                        </table>

                    </div>
                    <div class="row-fluid">

                    </div>
                </div>
            </div>
        </div>
        <s:include value="/jsp/footer.jsp"/>
    </body>
</html>
